<?php

namespace YouBaoLian\Application\Request;

use YouBaoLian\Application\Response\VehicleQuerySpecialResponse;

class VehicleQuerySpecialRequest extends Request
{
    private $configId = 0;

    private $priceItemId = 0;

    private $supplierId = 0;

    private $clauseCode = '';

    private $insType = 0;

    private $searchKey = '';

    private $skipCount = 0;

    private $takeCount = 20;

    protected $method = 'iebcVehicle.querySpecial';

    protected $response = VehicleQuerySpecialResponse::class;

    public function getBizContent(): array
    {
        $biz = [
            'configId' => $this->configId,
            'priceItemId' => $this->priceItemId,
            'supplierId' => $this->supplierId,
            'paging' => [
                'skipCount' => $this->skipCount,
                'takeCount' => $this->takeCount
            ]
        ];

        if ($this->clauseCode) {
            $biz['clauseCode'] = $this->clauseCode;
        }
        if ($this->insType) {
            $biz['insType'] = $this->insType;
        }
        if ($this->searchKey) {
            $biz['searchKey'] = $this->searchKey;
        }
        return $biz;
    }

    /**
     * @param int $configId
     */
    public function setConfigId(int $configId): void
    {
        $this->configId = $configId;
    }

    /**
     * @param int $priceItemId
     */
    public function setPriceItemId(int $priceItemId): void
    {
        $this->priceItemId = $priceItemId;
    }

    /**
     * @param int $supplierId
     */
    public function setSupplierId(int $supplierId): void
    {
        $this->supplierId = $supplierId;
    }

    /**
     * @param string $clauseCode
     */
    public function setClauseCode(string $clauseCode): void
    {
        $this->clauseCode = $clauseCode;
    }

    /**
     * @param int $insType
     */
    public function setInsType(int $insType): void
    {
        $this->insType = $insType;
    }

    /**
     * @param string $searchKey
     */
    public function setSearchKey(string $searchKey): void
    {
        $this->searchKey = $searchKey;
    }

    /**
     * @param int $skipCount
     */
    public function setSkipCount(int $skipCount): void
    {
        $this->skipCount = $skipCount;
    }

    /**
     * @param int $takeCount
     */
    public function setTakeCount(int $takeCount): void
    {
        $this->takeCount = $takeCount;
    }
}
